Charlie Veniot 14th October 2022 at 10:54pm
' SKI SLOPE CHALLENGE !
'
' A BASIC Anywhere Machine program by Charlie Veniot
' Based on the program by electricwalrus
' as found at the RetroCoders Community forum: https://retrocoders.phatcode.net/index.php?topic=210.0;topicseen"
SCREEN _NEWIMAGE(640,200,0)
GOSUB 🟠Welcome
🟢start🟢:
GOSUB 🟠Init
DO
i = INT(RND*2)+1
IF i = 1 THEN
x = x - 1
IF x < 10 THEN x = 10
END IF
IF i = 2 THEN
x = x + 1
IF x > 70 THEN x = 70
END IF
x2 = x - 10
FOR a = 1 TO x2: PRINT " "; : NEXT
COLOR 11: PRINT "* *";
thisKey$ = UCASE$(INKEY$)
GETMOUSE mx,my,mw,mb
IF thisKey$ = "A" OR (mb = 1 AND (mx < player * 8)) THEN player = player - 1
IF thisKey$ = "L" OR (mb = 1 AND (mx > player * 8)) THEN player = player + 1
check = player - x
IF check < -8 THEN GOTO 🔴endgame🔴
IF check > 7 THEN GOTO 🔴endgame🔴
LOCATE 25, player: COLOR 10: PRINT "!!"
speed = speed + 0.0005
SLEEP 0.250 - speed
score = score + 1
LOOP
🔴endgame🔴:
BEEP
SLEEP 1
CLS
LOCATE 1,1
COLOR 10
PRINT "You crashed on the ski-field!"
PRINT "Score: " + score
PRINT
COLOR 10
FOR seconds = 5 TO 1 STEP -1
PRINT "Try Again in " + seconds + " seconds"
SLEEP 1
NEXT
GOTO 🟢start🟢
🟠Welcome:
COLOR 10
PRINT "SKI SLOPE CHALLENGE !"
PRINT
PRINT "A BASIC Anywhere Machine program by Charlie Veniot"
PRINT "Based on the program by electricwalrus"
PRINT "as found at the RetroCoders Community forum: https://retrocoders.phatcode.net/index.php?topic=210.0;topicseen"
PRINT
PRINT "Ski Slope Challenge! By electricwalrus (2022)"
PRINT
PRINT "Try to last on this slope as long as possible"
PRINT
PRINT "Physical keyboard: Use the [A] key to steer left and the [L] key to steer right down the slope."
PRINT "Mouse: Click on the left and the right sides of the skier to steer."
PRINT "Touchscreen device: Tap on the left and right sides of the skier to steer."
PRINT
PRINT "Press any key to begin! (or tap on the screen)"
GETMOUSE mx,my,mw,mb
WHILE INKEY$ = "" AND mb <> 1: SLEEP 0.125 : GETMOUSE mx,my,mw,mb : WEND
RETURN
🟠Init:
CLS
score = 0
x = 40
player = 40
speed = 0
PRINT "Get Ready!"
SLEEP 1
LOCATE 25, 1
RETURN